@extends('layouts.admin_modal')

@section('content')
    <div class="box-body">
        <input type="hidden" name="info[pid]" value="{{ $pid }}">
        <input type="hidden" name="info[id]" value="{{ $id }}">

        <div class="form-group">
            <label class="col-sm-2 control-label">父级菜单名称</label>

            <div class="col-sm-10">
                <input type="text" class="form-control" name="" value="{{ get_value($pDetail, 'name', '顶级菜单') }}" disabled>
            </div>
        </div>


        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">菜单名称</label>

            <div class="col-sm-10">
                <input type="text" class="form-control" id="input-name" placeholder="请输入菜单名称……" name="info[name]" value="{{ get_value($detail, 'name', '') }}" >
            </div>
        </div>

        <div class="form-group">
            <label for="input-menu_type" class="col-sm-2 control-label">菜单类型</label>

            <div class="col-sm-10">
                <select name="info[menu_type]" class="form-control" id="input-menu_type">
                    @foreach(config('admin.systems.menu_type_list') as $key=>$value)
                        <option value="{{ $key }}"  {{ get_value($detail, 'menu_type', 0) == $key ? 'selected' : '' }}>{{ $value }}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-is_developer" class="col-sm-2 control-label">开发者菜单</label>

            <div class="col-sm-10">
                <select name="info[is_developer]" class="form-control" id="input-is_developer">
                    @foreach(config('admin.systems.is_developer_list') as $key=>$value)
                        <option value="{{ $key }}"  {{ get_value($detail, 'is_developer', 0) == $key ? 'selected' : '' }}>{{ $value }}</option>
                    @endforeach
                </select>
            </div>
        </div>


        <div class="form-group">
            <label for="input-slug" class="col-sm-2 control-label">菜单对应路由权限</label>

            <div class="col-sm-10">
                <input type="text" class="form-control" id="input-slug" placeholder="请输入菜单对应路由权限……" name="info[slug]" value="{{ get_value($detail, 'slug', '') }}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-url" class="col-sm-2 control-label">菜单地址</label>

            <div class="col-sm-10">
                <input type="text" class="form-control" id="input-url" placeholder="请输入菜单对应路由权限……" name="info[url]" value="{{ get_value($detail, 'url', '') }}">
            </div>
        </div>

        <div class="form-group">
            <label for="input-description" class="col-sm-2 control-label">菜单描述</label>

            <div class="col-sm-10">
                <textarea name="info[description]" id="input-description" cols="30" rows="10" class="form-control" placeholder="请输入菜单描述信息……"> </textarea>
            </div>
        </div>

    </div>

    <input type="hidden" name="info[id]" value="{{ get_value($detail, 'id') }}">
@endsection